package com.zkkj.demo.enume;

import com.zkkj.demo.common.ICode;

/**
 * author : cyc
 * Date : 2019/12/25
 */
public enum ErrorEnum implements ICode {

    VALIDATE_FAILED(404, "参数校验失败"),

    UNAUTHORIZED(401, "鉴权失败,请重新登录"),

    FORBIDDEN(403, "没有相关权限"),

    SYS_ERROR(500, "系统异常");


    private final int code;

    private final String desc;

    ErrorEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
